package kolekcje.powtorka.trzecia;

public class Song implements Comparable<Song> {

	private String title;
	private String artist;
	private String rating;
	private String bpmn;

	public Song(String title, String artist, String rating, String bpmn) {
		this.title = title;
		this.artist = artist;
		this.rating = rating;
		this.bpmn = bpmn;
	}

	@Override
	public int compareTo(Song song) {
		return this.title.compareTo(song.getTitle());
	}
	
	@Override
	public String toString(){
		return this.title +", " + this.artist + ", " + this.rating + " " + this.bpmn;
	}
	
	@Override
	public int hashCode(){
		return this.title.hashCode();
	}
	
	@Override
	public boolean equals(Object o){
		Song s = (Song) o;
		return this.title.equals(s.getTitle());
	}

	public String getTitle() {
		return title;
	}

	public String getArtist() {
		return artist;
	}

	public String getRating() {
		return rating;
	}

	public String getBpmn() {
		return bpmn;
	}

}
